package cn.com.bdqn.service.impl;

import cn.com.bdqn.dao.SysMenuDao;
import cn.com.bdqn.entity.SysMenu;
import cn.com.bdqn.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysMenuServiceImpl implements SysMenuService {

    @Autowired
    private SysMenuDao dao;

    @Override
    public List<SysMenu> queryMenuByRoleId(Long usrRoleId, Long menuParentCode) {
        return dao.queryMenuByRoleId(usrRoleId,menuParentCode);
    }

    @Override
    public List<SysMenu> queryAll(Long rfRoleId,Long menuParentCode) {
        return dao.queryAll(rfRoleId,menuParentCode);
    }

    @Override
    public List<SysMenu> queryByLike(SysMenu sysMenu) {
        return dao.queryByLike(sysMenu);
    }

    @Override
    public SysMenu queryByMenuCode(Long menuCode) {
        return dao.queryByMenuCode(menuCode);
    }

    @Override
    public int updateSysMenu(SysMenu sysMenu) {
        return dao.updateSysMenu(sysMenu);
    }

    @Override
    public List<SysMenu> queryParent() {
        return dao.queryParent();
    }

    @Override
    public int addSysMenu(SysMenu sysMenu) {
        return dao.addSysMenu(sysMenu);
    }
}
